package com.yqg.protection.controller.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yqg.protection.cover.LocalDateTimeConverter;
import com.yqg.protection.cover.MaintenanceStateConverter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * projectName:xf-service1
 * author:zxf
 * time:2024/10/15 14:31
 * description:
 */
@Data
public class ImportRecordMaintenanceDto {

    @ExcelProperty(value = "单位ID(必填)", index = 0)
    @ApiModelProperty("单位id")
    private Long clientId;

    @ExcelProperty(value = "维保单位(必填)", index = 1)
    @ApiModelProperty("维保单位")
    private String mainClientName;

    @ExcelProperty(value = "巡检记录ID", index = 2)
    @ApiModelProperty("巡检记录id")
    private Long inspectionId;

    @ExcelProperty(value = "维保人员名称(必填)", index = 3)
    @ApiModelProperty("维保人员名称")
    private String userName;

    @ExcelProperty(value = "维保地址ID(必填)", index = 4)
    @ApiModelProperty("维保地址ID")
    private Long address;

    @ExcelProperty(value = "维保电话(必填)", index = 5)
    @ApiModelProperty("维保电话")
    private String telephone;

    @ExcelProperty(value = "维保时间(必填)", index = 6, converter = LocalDateTimeConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty("维保时间")
    private LocalDateTime dateTime;

    @ExcelProperty(value = "维保信息", index = 7)
    @ApiModelProperty("维保信息")
    private String information;

    @ExcelProperty(value = "维保图片", index = 8)
    @ApiModelProperty("维保图片")
    private String informationPhoto;

    @ExcelProperty(value = "检查时间", index = 9, converter = LocalDateTimeConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty("检查时间")
    private LocalDateTime resultTime;

    @ExcelProperty(value = "检查结果", index = 10)
    @ApiModelProperty("检查结果")
    private String result;

    @ExcelProperty(value = "检查图片", index = 11)
    @ApiModelProperty("检查图片")
    private String resultPhoto;

    @ExcelProperty(value = "维保状态(已维保/未维保)(必填)", index = 12, converter = MaintenanceStateConverter.class)
    @ApiModelProperty("维保状态 0：已维保 1未维保")
    private String state;
}
